<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>top</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <script type="text/javascript"  src="/goods/jquery/jquery-1.5.1.js"></script>

    <style type="text/css">
        body {
            background: #15B69A;
            margin: 0px;
            color: #ffffff;
        }

        a {
            text-transform: none;
            text-decoration: none;
            color: #ffffff;
            font-weight: 900;
        }

        a:hover {
            text-decoration: underline;
        }

        .class {
            text-transform: none;
            text-decoration: none;
            color: #ffffff;
            font-weight: 900;
        }

        .imgclass {
            height: 10px;
        }

        .class:hover {
            color: red;
        }
    </style>
</head>

<body>
<h1 style="text-align: center;">网上书城系统</h1>
<div style="font-size: 10pt; line-height: 10px;">

    <c:if test="${user==null }">
        <a href="<c:url value='/jsps/user/login.jsp'/>" target="_parent">会员登录</a> |&nbsp;
        <a href="<c:url value='/jsps/user/regist.jsp'/>" target="_parent">注册会员</a>
    </c:if>
    <c:if test="${user!=null }">
        会员：${user.loginname }&nbsp;&nbsp;|&nbsp;&nbsp;
        <a href="<c:url value='/cart/GetCartiermByUid?uid=${user.uid}'/>" target="body">我的购物车</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        <a href="<c:url value='/order/GetOrdersByUid?uid=${user.uid }'/>" target="body">我的订单</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        <a href="<c:url value='/jsps/user/pwd.jsp'/>" target="body">修改密码</a>&nbsp;&nbsp;|&nbsp;&nbsp;
        <a href="<c:url value='/User/LoginOut'/>" target="_parent">退出</a>
    </c:if>


    <a href="<c:url value='/jsps/webservice/EnglishChinese.jsp'/>" target="_parent">中英翻译</a>
    <a href="<c:url value='/jsps/webservice/mobile.jsp'/>" target="_parent">手机号归属地查询</a>
    <a href="<c:url value='/jsps/webservice/weather.jsp'/>" target="_parent">天气查询</a>
    <a href="<c:url value='/adminjsps/login.jsp'/>" target="_parent">管理员登录</a>
    <span class="class">| 所在城市：
			<span id="city" class="class">${city}</span>
	</span>
    <div style="float: left;" class="wsdiv">
        <img alt="" src="" id="todayimg" class="imgclass">
        <span class="class" id="todaytemperature"></span>
    </div>
    <div style="float:  left;" class="wsdiv">
        <img alt="" src="" id="tomorrowimg" class="imgclass">
        <span class="class" id="tomorrowtemperature"></span>
        <span class="class">&nbsp;&nbsp;&nbsp;</span>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        var  city  =  $("#city").text();

        $.post("/goods/WebService/GetWeather",{'city':city}, function(json) {
            $("#todayimg").attr("src",json.today.imgpath);
            $("#todaytemperature").text(json.today.temperature);

            $("#tomorrowimg").attr("src",json.tomorrow.imgpath);
            $("#tomorrowtemperature").text(json.tomorrow.temperature);
        })


    });
</script>

</body>
</html>
